package liangtWorkSpace.factory.headFirstFactory.SimpFactory;

/**
 * @ClassName SimplePizzaFactory
 * @Description : 披萨工厂
 * @Author : LiangT
 * @Date : 2020/7/3 10:48
 */
public class SimplePizzaFactory {

    /**
     * 创建披萨
     * @param type
     * @return
     */
    public Pizza createPizza(String type){
        Pizza pizza = null;
        switch (type){
            case "clam":pizza=new ClamPizza();break;
            case "veggid":pizza=new ClamPizza();break;
            case "chesse":pizza=new ClamPizza();break;
            default:break;
        }
        return pizza;
    }
}
